package com.hyt.it.ogt.kq.service.gov.feign.ks.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hyt.it.ogt.cj.model.entity.ProjectCollectInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@ApiModel(
        value = "ProjectCollectInfo对象",
        description = "项目采集信息"
)
public class KwProjectCollectInfoVO {
    @ApiModelProperty("项目id")
    private String projectId;
    @ApiModelProperty("采集信息Id")
    private String collectInfoId;
    @ApiModelProperty("采集信息名称")
    private String title;
    @ApiModelProperty("组件类型 input输入框、select选择框、address地址、date日期、file附件或图片")
    private String componentType;
    @ApiModelProperty("默认值")
    private String defaultValue;
    @ApiModelProperty("是否可见(0否1是)")
    private Integer visible;
    @ApiModelProperty("是否可编辑(0否1是)")
    private Integer editable;
    @ApiModelProperty("是否必填(0否1是)")
    private Integer required;
    @ApiModelProperty("是否可重复(0否1是)")
    private Integer duplicate;
    @ApiModelProperty("排序")
    private Integer orderNum;
    @ApiModelProperty("配置数量")
    private Integer infoNum;
    @ApiModelProperty("描述")
    private String description;
    @ApiModelProperty("组件name")
    private String componentName;
    @ApiModelProperty("是否固定采集项(0否1是)")
    private Integer isFixOption;
    @ApiModelProperty("UUIDUtils.32位)")
    private String id;
    @ApiModelProperty(value = "创建人ID")
    private String createBy;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(
            shape = JsonFormat.Shape.STRING,
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private LocalDateTime createDate;
    @ApiModelProperty(value = "更新人ID")
    private String updateBy;
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(
            shape = JsonFormat.Shape.STRING,
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private LocalDateTime updateDate = LocalDateTime.now();
    @ApiModelProperty(value = "删除标记(false：正常；true：删除)")
    private Boolean delFlag;

    public KwProjectCollectInfoVO() {
    }

    public KwProjectCollectInfoVO(ProjectCollectInfo projectCollectInfo) {
        this.projectId = projectCollectInfo.getProjectId();
        this.collectInfoId = projectCollectInfo.getCollectInfoId();
        this.title = projectCollectInfo.getTitle();
        this.componentType = projectCollectInfo.getComponentType();
        this.defaultValue = projectCollectInfo.getDefaultValue();
        this.visible = projectCollectInfo.getVisible();
        this.editable = projectCollectInfo.getEditable();
        this.required = projectCollectInfo.getRequired();
        this.duplicate = projectCollectInfo.getDuplicate();
        this.orderNum = projectCollectInfo.getOrderNum();
        this.infoNum = projectCollectInfo.getInfoNum();
        this.description = projectCollectInfo.getDescription();
        this.componentName = projectCollectInfo.getComponentName();
        this.isFixOption = projectCollectInfo.getIsFixOption();
        this.id = projectCollectInfo.getId();
        this.createBy = projectCollectInfo.getCreateBy();
        this.createDate = projectCollectInfo.getCreateDate();
        this.updateBy = projectCollectInfo.getUpdateBy();
        this.updateDate = projectCollectInfo.getUpdateDate();
        this.delFlag = projectCollectInfo.getDelFlag();
    }
}
